package com.dragandjuric.lse.boncote.tapestry.pages;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.dragandjuric.lse.boncote.Person;
import com.dragandjuric.lse.boncote.service.Persons;

public class DisplayPerson {

	@Property
	private Person person;
	
	@Inject
	private Persons persons;
	
	public void onActivate(String lastName) {
	    person = persons.retrieve(lastName);
	}
	
	String onPassivate() {
		return person.getLastName();
	}
}
